package ferp.core.ai.nn.activation;

/**
 * User: igorgok
 * Date: 12/2/13 3:42 PM
 */
public class Linear implements Activation
{
  public Linear(double factor)
  {
    this.factor = factor;
  }

  @Override
  public double activate(double d)
  {
    return d * factor;
  }

  @Override
  public double derivative(double d)
  {
    return factor;
  }

  private final double factor;
}
